<link rel="stylesheet" type="text/css" href="{$smarty.const.BASE_URL}/js/flexigrid/css/flexigrid.pack.css">
<script type="text/javascript" src="{$smarty.const.BASE_URL}/js/flexigrid/js/flexigrid.pack.js"></script>

<div id="container">
	<div >
		<h1 class="content-header">{$_TR.video_cat_management_title}</h1>
		<table id="actions_map_table" width="99%" border=0 class="actions-map">
			<thead>
				<tr class="header">
					<th width=170>{$_TR.video_cat_title}</th>
					<th width=210>{$_TR.video_cat_seo_name}</th>
					<th width=330>{$_TR.video_cat_search_des}</th>
				</tr>
			</thead>
			<tbody>
				{foreach name=a from=$video_cats item=video}
				<tr>
					<td>
						{$video->title}
						{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
						{if $permissions.edit == 1 || $permissions.administrate == 1}
						<a href="{link action=video_cat_edit id=$action->id src=$__loc->src}" title="Edit this entry">
							<img src="{$smarty.const.ICON_RELATIVE}edit.png" title="{$_TR.alt_edit}" alt="{$_TR.alt_edit}" />
						</a>
						{/if}
						{if $permissions.delete == 1 || $permissions.administrate == 1}
						<a href="{link action=video_cat_delete id=$video->id src=$__loc->src}" title="Delete this entry">
							<img src="{$smarty.const.ICON_RELATIVE}delete.png" title="{$_TR.alt_delete}" alt="{$_TR.alt_delete}" />
						</a>
						{/if}
						{/permissions}
					</td>
					<td class="right">{$video->seo_name}</td>
					<td class="right">{$video->search_des}</td>
				</tr>     
				{/foreach}
			</tbody>
		</table> 
	</div>
</div>
<div class="clear"></div>
{literal}
	<script language='javascript'>
		jQuery('#actions_map_table').flexigrid({
			height:'auto',
			striped:true,
			usepager : false,
			resizable: false,
			novstripe: true,
			//title : 'Countries',
			useRp : true,
			rp : 15,
			showTableToggleBtn : false,
			buttons : [ {
				name : 'Add',
				bclass : 'add',
				onpress : AB_PDoremiShop_ActionMap_addNew
			},  {
				separator : true
			} ],
			
		});
		
		function AB_PDoremiShop_ActionMap_addNew(com, grid) {
			if (com == 'Add') {
				window.location='{/literal}{link action=video_cat_edit}{literal}';
			}
		}
	</script>
{/literal}